package com.kgdev.cweb.entities.pub;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import com.kgdev.cweb.entities.ManagedEntity;


/**
 * The persistent class for the pub_plate_article database table.
 * 
 */
@Entity
@NamedQueries(value = {
		@NamedQuery(name = "PlateArticle.findAll", query = "select p from PlateArticle p")})
@Table(name="pub_plate_article")
public class PlateArticle implements Serializable, ManagedEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="article_id", unique=true, nullable=false, length=45)
	private String articleId;

	@Column(name="chocolino_article", length=45)
	private String chocolinoArticle;

	private Float diameter;

	@Column(name="has_body", nullable=false)
	private Boolean hasBody;

	private Float height;

	@Column(name="is_available", nullable=false)
	private Boolean isAvailable;

	private Float length;

	private Float weight;

	private Float width;

	public PlateArticle() {
    }

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PlateArticle other = (PlateArticle) obj;
		if (articleId == null) {
			if (other.articleId != null)
				return false;
		} else if (!articleId.equals(other.articleId))
			return false;
		return true;
	}

    public String getArticleId() {
		return this.articleId;
	}

	public String getChocolinoArticle() {
		return this.chocolinoArticle;
	}

	public Float getDiameter() {
		return this.diameter;
	}

	public Boolean getHasBody() {
		return this.hasBody;
	}

	public Float getHeight() {
		return this.height;
	}

	public Boolean getIsAvailable() {
		return this.isAvailable;
	}

	public Float getLength() {
		return this.length;
	}

	public Float getWeight() {
		return this.weight;
	}

	public Float getWidth() {
		return this.width;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((articleId == null) ? 0 : articleId.hashCode());
		return result;
	}

	public void setArticleId(String articleId) {
		this.articleId = articleId;
	}

	public void setChocolinoArticle(String chocolinoArticle) {
		this.chocolinoArticle = chocolinoArticle;
	}

	public void setDiameter(Float diameter) {
		this.diameter = diameter;
	}

	public void setHasBody(Boolean hasBody) {
		this.hasBody = hasBody;
	}

	public void setHeight(Float height) {
		this.height = height;
	}

	public void setIsAvailable(Boolean isAvailable) {
		this.isAvailable = isAvailable;
	}

	public void setLength(Float length) {
		this.length = length;
	}

	public void setWeight(Float weight) {
		this.weight = weight;
	}

	public void setWidth(Float width) {
		this.width = width;
	}

}